import { Router } from 'express';
import { sslController } from '../controllers/ssl.controller';
import { auth } from '../middleware/auth';

const router = Router();

// 获取所有证书
router.get('/certificates', auth, sslController.getCertificates);

// 下载证书
router.get('/certificates/:domain/download', auth, sslController.downloadCertificate);

// 测试配置
router.post('/test', auth, sslController.testConfig);

// 重新加载配置
router.post('/reload', auth, sslController.reloadConfig);

export default router; 